<template>
	<view class="container">
		<uni-collapse>
			<!-- <view v-for="noti in allNoti" :key="noti.id">
				<template v-if="noti.id == notiNo">
					<my-uni-section :title="noti.title" :sub-title="getNotiLevelStr(noti.type)"
						:numberColor="getNoColorStr(noti.type)" :notiNo="noti.id">
					</my-uni-section>
					<uni-section :title="noti.title"></uni-section>
					<uni-section :title="noti.content"></uni-section>

					<uni-section :title="noti.createdAt"></uni-section>
					<uni-section title="上传文件" sub-title="选择对应的文件"></uni-section>
					<view class="upLoadImage">
						<uni-file-picker v-model="fileValue" fileMediatype="all" mode="grid" @select="select"
							@progress="progress" @success="success" @fail="fail" />
					</view>
					
					
				</template>
			</view> -->
		</uni-collapse>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				current: 1,
				limit: 10,
				discussId: 0,
				post: {
				      id: 3,
				      userId: 1,
				      title: "这个是不为空的标题",
				      content: "",
				      type: 0,
				      status: 0,
				      createTime: "2023-09-24T03:11:52.000+0000",
				      commentCount: 0,
				      score: 3553,
				      isDeleted: 0
				    },
				    likeCount: 0,
				    likeStatus: 0,
				    user: {
				      id: 1,
				      username: "SYSTEM",
				      password: "",
				      salt: "",
				      email: "system@banbang.com",
				      type: 0,
				      status: 1,
				      activationCode: null,
				      headerUrl: "http://static.nowcoder.com/images/head/notify.png",
				      createTime: "2020-01-12T18:11:03.000+0000",
				      wechatOpenId: null
				    }
				
			};
		},

		mounted() {
		},

		computed: {
		},
		
		// 生命周期函数
		onLoad(options) {
			// this.discussId = options.discussId
		},

		methods: {
			getDiscussDetail(){
				const than = this
				const url = `http://localhost:8080/api/discuss/detail/${this.curren}?current=${this.current}&limit=${this.limit}`
				this.$http({
					url: url,
					method: 'GET',
					data: {},
					header: {
						'ticket': uni.getStorageSync('ticket')
					}
				}).then(res => {
					console.log(res.data.data.discussPosts)
					this.$data.discussPosts = res.data.data.discussPosts
					than.post = res.data.data.post
					than.user = res.data.data.user
					than.likeCount = res.data.data.likeCount
					than.likeStatus = res.data.data.likeStatus
				})
			}
		}
	}
</script>

<style lang="scss">
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
		
		.upLoadImage {
			// border: 1rpx solid deeppink;
			margin: 30rpx;
		}
	}
</style>
